package bingo.controle;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class QuerysBD 
{
	static Connection conn;

	public int insereNumPainel(int id_jogo, int numero )
	{
		try {
			ConexaoBD c = new ConexaoBD();
			conn = c.obterConexao(); 
			PreparedStatement stm = conn.prepareStatement("insert into painel (id_jogo,numero) values (?,?)");
			System.out.println(stm);
			stm.setInt(1,id_jogo);
			stm.setInt(2,numero);			
			stm.execute();
			stm.close();
			conn = null;
			return 1;

		} catch(Exception e) {
			e.printStackTrace();
			return 0;
		}		
	}
}
